<extend name="Base/ucenter_common"/>
<block name="body">
    <div id="zj-bh-search">
        <div class="widget-box">
            <div class="widget-header">
                <h3>我的赛事</h3>
            </div>
            <div class="widget-body">
                <table class="table table-bordered" id="allMatch">
                    <thead>
                    <tr style="background-color: #F2F3F7;">
                        <th>背号</th>
                        <th>组号</th>
                        <th>订单号</th>
                        <th>姓名</th>
                        <th>组别</th>
                        <th>报名时间</th>
                        <th>比赛开始时间</th>
                        <th>项目代号</th>
                        <th>状态</th>
                        <th>分数</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="_list" id="vo">
                        <tr>
                            <td>{$vo.back_no}</td>
                            <td>{$vo.j_id}</td>
                            <td>{$vo.order_no}</td>
                            <td>{$vo.u_name}</td>
                            <td>{$vo.g_name}</td>
                            <td>{$vo.g_create_time|date="Y-m-d H:i:s",###}</td>
                            <td>{$vo.g_start}</td>
                            <td>{$vo.g_short}</td>
                            <td>
                                <eq name="vo.pay_status" value="0">
                                    <label class="label label-danger">未支付</label>
                                    <else/>
                                    <label class="label label-success">已支付</label>
                                </eq>
                                <eq name="vo.status" value="0">
                                    <label class="label label-danger">已取消</label>
                                </eq>
                            </td>
                            <td>
                                <if condition="$vo.g_grade eq 0">
                                    <label for="">未出成绩</label>
                                    <else/>
                                    <label for="">{$vo.gr_grade}</label>
                                </if>
                            </td>
                            <td>
                                <a href="{:U('project/detail',array('j_id'=>$vo['j_id']))}">查看明细</a>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script>
        new Vue({
            el: '#zj-bh-search',
            data: {bh_list: [], bh_id: ''},
            methods: {
                search: function () {
                    var bh_id = this.$data.bh_id;
                    $.post("{:U('User/my_grade')}", {bh_id: bh_id}, function (ret) {
                        console.log(ret);
                        if (ret.length <= 0) {
                            layer.msg('未查询到背号数据');
                        }
                    });
                }
            }
        });
    </script>
</block>
